summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-06-19 03:59:34 +0000
committerMike Melanson <mike@multimedia.cx>2004-06-19 03:59:34 +0000
commit0bd586c50dc27ec38ca94e58f50030544d729463 (patch)
treedaa391f5efede8e58b88431b9b453dcbd1e6c2e0 /libavformat/mpeg.c
parentcbf5374fc0f733cefe304fd4d11c7b0fa21fba61 (diff)
sweeping change from -EIO -> AVERROR_IO
Originally committed as revision 3239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 8a552450fa..a478782dd4 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -1164,7 +1164,7 @@ static int mpegps_read_pes_header(AVFormatContext *s,
startcode = find_next_start_code(&s->pb, &size, &m->header_state);
//printf("startcode=%x pos=0x%Lx\n", startcode, url_ftell(&s->pb));
if (startcode < 0)
- return -EIO;
+ return AVERROR_IO;
if (startcode == PACK_START_CODE)
goto redo;
if (startcode == SYSTEM_HEADER_START_CODE)
@@ -1284,7 +1284,7 @@ static int mpegps_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AVStream *st;
- int len, startcode, i, type, codec_id;
+ int len, startcode, i, type, codec_id = 0;
int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
redo:
@@ -1350,6 +1350,15 @@ static int mpegps_read_packet(AVFormatContext *s,
av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f\n",
pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0);
#endif
+
+#if 1
+//#ifdef CONFIG_ADX
+ if (codec_id == CODEC_ID_MP2 && is_adx(pkt->data,pkt->size)) {
+printf ("found ADX...\n");
+ st->codec.codec_id = CODEC_ID_ADPCM_ADX;
+ }
+#endif //CONFIG_ADX
+
return 0;
}