- // XXX temporary hack, will be turned to a switch() once all codec
- // types are split out
- if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- ret = transcode_audio(ist, &avpkt, &got_output);
- if (ret < 0)
- return ret;
- continue;
- } else if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
- ret = transcode_video(ist, &avpkt, &got_output, &pkt_pts);
- if (ret < 0)
- return ret;
- if (!got_output)
- goto discard_packet;
- continue;
- } else if (ist->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
- ret = transcode_subtitles(ist, &avpkt, &got_output);
- if (ret < 0)
- return ret;
- if (!got_output)
- goto discard_packet;
- continue;
- }
-
- /* decode the packet if needed */