Commit 4257ce11 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dxa: remove useless code
  lavf: don't select an attached picture as default stream for seeking.
  avconv: remove pointless checks.
  avconv: check for get_filtered_frame() failure.
  avconv: remove a pointless check.
  swscale: convert hscale() to use named arguments.
  x86inc: add *mp named argument support to DEFINE_ARGS.
  swscale: convert hscale to cpuflags().

Conflicts:
	ffmpeg.c
	libswscale/x86/scale.asm
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents c743aad5 702985b8
...@@ -2178,13 +2178,13 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ...@@ -2178,13 +2178,13 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
} }
if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) { if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) {
ret = AVERROR(ENOMEM); ret = AVERROR(ENOMEM);
goto end; goto fail;
} }
filtered_frame = ist->filtered_frame; filtered_frame = ist->filtered_frame;
*filtered_frame= *decoded_frame; //for me_threshold *filtered_frame= *decoded_frame; //for me_threshold
avfilter_fill_frame_from_video_buffer_ref(filtered_frame, ost->picref); avfilter_fill_frame_from_video_buffer_ref(filtered_frame, ost->picref);
filtered_frame->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q); filtered_frame->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
if (ost->picref->video && !ost->frame_aspect_ratio) if (!ost->frame_aspect_ratio)
ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio; ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio;
do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame); do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame);
cont: cont:
...@@ -2195,7 +2195,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ...@@ -2195,7 +2195,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
#endif #endif
} }
end: fail:
av_free(buffer_to_free); av_free(buffer_to_free);
return ret; return ret;
} }
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
* Decoder context * Decoder context
*/ */
typedef struct DxaDecContext { typedef struct DxaDecContext {
AVCodecContext *avctx;
AVFrame pic, prev; AVFrame pic, prev;
int dsize; int dsize;
...@@ -292,7 +291,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -292,7 +291,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
{ {
DxaDecContext * const c = avctx->priv_data; DxaDecContext * const c = avctx->priv_data;
c->avctx = avctx;
avctx->pix_fmt = PIX_FMT_PAL8; avctx->pix_fmt = PIX_FMT_PAL8;
avcodec_get_frame_defaults(&c->pic); avcodec_get_frame_defaults(&c->pic);
......
...@@ -1399,7 +1399,8 @@ int av_find_default_stream_index(AVFormatContext *s) ...@@ -1399,7 +1399,8 @@ int av_find_default_stream_index(AVFormatContext *s)
return -1; return -1;
for(i = 0; i < s->nb_streams; i++) { for(i = 0; i < s->nb_streams; i++) {
st = s->streams[i]; st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
!(st->disposition & AV_DISPOSITION_ATTACHED_PIC)) {
return i; return i;
} }
if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO) if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
......
...@@ -246,6 +246,7 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9 ...@@ -246,6 +246,7 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9
CAT_UNDEF arg_name %+ %%i, w CAT_UNDEF arg_name %+ %%i, w
CAT_UNDEF arg_name %+ %%i, b CAT_UNDEF arg_name %+ %%i, b
CAT_UNDEF arg_name %+ %%i, m CAT_UNDEF arg_name %+ %%i, m
CAT_UNDEF arg_name %+ %%i, mp
CAT_UNDEF arg_name, %%i CAT_UNDEF arg_name, %%i
%assign %%i %%i+1 %assign %%i %%i+1
%endrep %endrep
...@@ -260,6 +261,7 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9 ...@@ -260,6 +261,7 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9
%xdefine %1w r %+ %%i %+ w %xdefine %1w r %+ %%i %+ w
%xdefine %1b r %+ %%i %+ b %xdefine %1b r %+ %%i %+ b
%xdefine %1m r %+ %%i %+ m %xdefine %1m r %+ %%i %+ m
%xdefine %1mp r %+ %%i %+ mp
CAT_XDEFINE arg_name, %%i, %1 CAT_XDEFINE arg_name, %%i, %1
%assign %%i %%i+1 %assign %%i %%i+1
%rotate 1 %rotate 1
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment