mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/wtvenc: advise user when H264 startcode is not present
Fixes ticket #3473. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e61973db6c
commit
92d657b5f1
@ -418,7 +418,7 @@ OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood_aud.o
|
|||||||
OBJS-$(CONFIG_WSVQA_DEMUXER) += westwood_vqa.o
|
OBJS-$(CONFIG_WSVQA_DEMUXER) += westwood_vqa.o
|
||||||
OBJS-$(CONFIG_WTV_DEMUXER) += wtvdec.o wtv_common.o asfdec.o asf.o asfcrypt.o \
|
OBJS-$(CONFIG_WTV_DEMUXER) += wtvdec.o wtv_common.o asfdec.o asf.o asfcrypt.o \
|
||||||
avlanguage.o mpegts.o isom.o
|
avlanguage.o mpegts.o isom.o
|
||||||
OBJS-$(CONFIG_WTV_MUXER) += wtvenc.o wtv_common.o
|
OBJS-$(CONFIG_WTV_MUXER) += wtvenc.o wtv_common.o mpegtsenc.o
|
||||||
OBJS-$(CONFIG_WV_DEMUXER) += wvdec.o wv.o apetag.o img2.o
|
OBJS-$(CONFIG_WV_DEMUXER) += wvdec.o wv.o apetag.o img2.o
|
||||||
OBJS-$(CONFIG_WV_MUXER) += wvenc.o wv.o apetag.o img2.o
|
OBJS-$(CONFIG_WV_MUXER) += wvenc.o wv.o apetag.o img2.o
|
||||||
OBJS-$(CONFIG_XA_DEMUXER) += xa.o
|
OBJS-$(CONFIG_XA_DEMUXER) += xa.o
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "avio_internal.h"
|
#include "avio_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "mpegts.h"
|
||||||
#include "wtv.h"
|
#include "wtv.h"
|
||||||
|
|
||||||
#define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
|
#define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
|
||||||
@ -460,10 +461,15 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
{
|
{
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
WtvContext *wctx = s->priv_data;
|
WtvContext *wctx = s->priv_data;
|
||||||
|
AVStream *st = s->streams[pkt->stream_index];
|
||||||
|
|
||||||
if (s->streams[pkt->stream_index]->codec->codec_id == AV_CODEC_ID_MJPEG && !wctx->thumbnail.size) {
|
if (st->codec->codec_id == AV_CODEC_ID_MJPEG && !wctx->thumbnail.size) {
|
||||||
av_copy_packet(&wctx->thumbnail, pkt);
|
av_copy_packet(&wctx->thumbnail, pkt);
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (st->codec->codec_id == AV_CODEC_ID_H264) {
|
||||||
|
int ret = ff_check_h264_startcode(s, st, pkt);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* emit sync chunk and 'timeline.table.0.entries.Event' record every 50 frames */
|
/* emit sync chunk and 'timeline.table.0.entries.Event' record every 50 frames */
|
||||||
|
Loading…
Reference in New Issue
Block a user