summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-29 19:28:42 -0700
committerAlex Converse <alex.converse@gmail.com>2011-08-30 10:12:22 -0700
commitf593628e5868e52a46de666767896c6afcebdae4 (patch)
treed53f7a03b23bc2bc70c11b534039008ab8800fed /avconv.c
parenta80852316e92d0b7850e15e2dd30123ef81e0ce1 (diff)
avconv: Replace raw picture frame swapping hack.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/avconv.c b/avconv.c
index 6514269fb2..32ae3757d0 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1098,11 +1098,10 @@ static void do_video_out(AVFormatContext *s,
{
int nb_frames, i, ret, format_video_sync;
AVFrame *final_picture;
- AVCodecContext *enc, *dec;
+ AVCodecContext *enc;
double sync_ipts;
enc = ost->st->codec;
- dec = ist->st->codec;
sync_ipts = get_sync_ipts(ost) / av_q2d(enc->time_base);
@@ -1156,15 +1155,14 @@ static void do_video_out(AVFormatContext *s,
/* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
- AVFrame* old_frame = enc->coded_frame;
- enc->coded_frame = dec->coded_frame; //FIXME/XXX remove this hack
+ enc->coded_frame->interlaced_frame = in_picture->interlaced_frame;
+ enc->coded_frame->top_field_first = in_picture->top_field_first;
pkt.data= (uint8_t *)final_picture;
pkt.size= sizeof(AVPicture);
pkt.pts= av_rescale_q(ost->sync_opts, enc->time_base, ost->st->time_base);
pkt.flags |= AV_PKT_FLAG_KEY;
write_frame(s, &pkt, ost->st->codec, ost->bitstream_filters);
- enc->coded_frame = old_frame;
} else {
AVFrame big_picture;