The variation of frequency content of a seismic trace with time carries information about the properties of the subsurface reflectivity sequence. Time-frequency (TF) analysis is a significant tool to extract such information for seismostratigraphic interpretation purposes. However, several TF transforms have been reported in the literature; higher resolution and sensitivity to local changes of the signal have always mattered. We have developed an adaptive high-resolution TF transform that is performed in two sequential steps: First, the window length is adaptively determined for each sample of the signal such that it leads to maximum compactness of energy in the resulting TF plane. Second, the generated nonstationary windows are used to inversely decompose the signal under study via a convex constrained sparse optimization, where a mixed norm of the TF coefficients is minimized subject to invertibility of the transform. Later on, the optimized transform is used as an efficient tool for seismic data analysis such as thin-bed characterization and thin-bedded gas reservoir detection. In the case of gas reservoir detection, based on amplitude versus offset analysis in the TF domain, a simple new method called the difference section was evaluated. The results of various numerical examples from synthetic and field data revealed a remarkable performance of the proposed method compared with the state-of-the-art TF transforms.