Mercurial > libavformat.hg
comparison utils.c @ 2586:1813683cc888 libavformat
Add checking for codecid to has_codec_parameters().
patch by Ronald S. Bultje, rsbultje gmail com
Date: Sat, 29 Sep 2007 09:25:52 -0400
Subject: [FFmpeg-devel] [PATCH] has_codec_parameters() addition
author | diego |
---|---|
date | Mon, 01 Oct 2007 22:11:10 +0000 |
parents | 26a6da30d5f1 |
children | fb544409b242 |
comparison
equal
deleted
inserted
replaced
2585:ecd8a9aa182d | 2586:1813683cc888 |
---|---|
1636 break; | 1636 break; |
1637 default: | 1637 default: |
1638 val = 1; | 1638 val = 1; |
1639 break; | 1639 break; |
1640 } | 1640 } |
1641 return (val != 0); | 1641 return (enc->codec_id != CODEC_ID_NONE && val != 0); |
1642 } | 1642 } |
1643 | 1643 |
1644 static int try_decode_frame(AVStream *st, const uint8_t *data, int size) | 1644 static int try_decode_frame(AVStream *st, const uint8_t *data, int size) |
1645 { | 1645 { |
1646 int16_t *samples; | 1646 int16_t *samples; |
1800 /* variable fps and no guess at the real fps */ | 1800 /* variable fps and no guess at the real fps */ |
1801 if( (st->codec->time_base.den >= 101LL*st->codec->time_base.num || st->codec->codec_id == CODEC_ID_MPEG2VIDEO) | 1801 if( (st->codec->time_base.den >= 101LL*st->codec->time_base.num || st->codec->codec_id == CODEC_ID_MPEG2VIDEO) |
1802 && duration_count[i]<20 && st->codec->codec_type == CODEC_TYPE_VIDEO) | 1802 && duration_count[i]<20 && st->codec->codec_type == CODEC_TYPE_VIDEO) |
1803 break; | 1803 break; |
1804 if(st->parser && st->parser->parser->split && !st->codec->extradata) | 1804 if(st->parser && st->parser->parser->split && !st->codec->extradata) |
1805 break; | |
1806 if (st->codec->codec_type == CODEC_TYPE_AUDIO && | |
1807 st->codec->codec_id == CODEC_ID_NONE) | |
1808 break; | 1805 break; |
1809 if(st->first_dts == AV_NOPTS_VALUE) | 1806 if(st->first_dts == AV_NOPTS_VALUE) |
1810 break; | 1807 break; |
1811 } | 1808 } |
1812 if (i == ic->nb_streams) { | 1809 if (i == ic->nb_streams) { |