提交 7be806f3 编写于 作者: C Chriss 提交者: Michael Niedermayer

-target dvd minimum vobu length patch by ("Chris" [chris garveycocker com])

Originally committed as revision 3953 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 cb43c0e1
...@@ -47,6 +47,7 @@ typedef struct { ...@@ -47,6 +47,7 @@ typedef struct {
int lpcm_align; int lpcm_align;
uint8_t *fifo_iframe_ptr; uint8_t *fifo_iframe_ptr;
int align_iframe; int align_iframe;
int64_t vobu_start_pts;
} StreamInfo; } StreamInfo;
typedef struct { typedef struct {
...@@ -1176,9 +1177,10 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) ...@@ -1176,9 +1177,10 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1); fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1);
if (s->is_dvd){ if (s->is_dvd){
if (is_iframe) { if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)
stream->fifo_iframe_ptr = stream->fifo.wptr; stream->fifo_iframe_ptr = stream->fifo.wptr;
stream->align_iframe = 1; stream->align_iframe = 1;
stream->vobu_start_pts = pts;
} else { } else {
stream->align_iframe = 0; stream->align_iframe = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册