Am Dienstag, 23. Juli 2019, 15:14:05 CEST schrieb Gerion Entrup: > Hi, > > I have an mpeg stream where the probing does not find one (vobsub subtitle) > stream because it appears to late. > However, I know that such a stream exists. > > Currently, given my input AVFormatContext, I try to create a new subtitle > stream with: > ``` > AVFormatContext* ifmt_ctx = ...; > AVStream* stream = avformat_new_stream(ifmt_ctx, NULL); > > stream->codecpar->codec_id = AV_CODEC_ID_DVD_SUBTITLE; > stream->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; > ``` > > However, when I then read packets from the stream with av_read_frame() and > the subtitle stream appears, it is not assigned to my newly created stream, > but to another new one. > > Is there a way to preallocate the subtitle stream (before any call to > av_read_frame() but in a way, that av_read_frame assigns the packet to > exactly this manually created stream? > > Thanks > Gerion
Ok, this seems not to be possible. mpeg matches the streams with its id that I don't know beforehand. I have workarounded this now.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
